﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IteratorPattern
{
    public class MyList : IEnumerable
    {
        private List<object> lst = new List<object>();
        public void Add(object o)
        {
            lst.Add(o);
        }
        public IEnumerator GetEnumerator()
        {
           return lst.GetEnumerator();
        }
    }
}
